/**
 *
 * author ThuanLT
 * Aug 20, 2014
 *
 */

package vn.fsoft.gst.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.stereotype.Repository;

@Repository
@Entity
@Table(name = "organisations")
public class Organisation {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "OrgID")
	private int orgID;
	

	@Column(name = "OrgName")
	private String orgName;

	@Column(name = "OrgShortDescription")
	private String orgShortDescription;

	@Column(name = "AddressLine1")
	private String addressLine1;

	@Column(name = "AddressLine2")
	private String addressLine2;

	@Column(name = "AddressLine3")
	private String addressLine3;

	@Column(name = "PreferredOrg")
	private boolean preferredOrg;

	@Column(name = "PhoneNumber")
	private String phoneNumber;

	@Column(name = "Fax")
	private String fax;

	@Column(name = "WebAddress")
	private String webAddress;

	@Column(name = "CharityNumber")
	private String charityNumber;

	@Column(name = "CompanyNumber")
	private String companyNumber;

	@Column(name = "IsActive")
	private boolean isActive;

	@ManyToOne
	@JoinColumn(name = "AddressID")
	private Address address;

	@ManyToOne
	@JoinColumn(name="contactID")
	private Contact contact;
	
	@ManyToOne
	@JoinColumn(name="SICCode")
	private Sic sic;
	
	public Contact getContact() {
		return contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

	public void setWebAddress(String webAddress) {
		this.webAddress = webAddress;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	public Organisation() {

	}

	public Organisation(String orgName, String orgShortDescription,
			String addressLine1, String addressLine2, String addressLine3,
			boolean preferredOrg, String phoneNumber, String fax,
			String webAddress, String charityNumber, String companyNumber) {
		super();
		this.orgName = orgName;
		this.orgShortDescription = orgShortDescription;
		this.addressLine1 = addressLine1;
		this.addressLine2 = addressLine2;
		this.addressLine3 = addressLine3;
		this.preferredOrg = preferredOrg;
		this.phoneNumber = phoneNumber;
		this.fax = fax;
		this.webAddress = webAddress;
		this.charityNumber = charityNumber;
		this.companyNumber = companyNumber;
		this.isActive = true;
	}


	public int getOrgID() {
		return orgID;
	}

	public void setOrgID(int orgID) {
		this.orgID = orgID;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public String getOrgShortDescription() {
		return orgShortDescription;
	}

	public void setOrgShortDescription(String orgShortDescription) {
		this.orgShortDescription = orgShortDescription;
	}

	public String getAddressLine1() {
		return addressLine1;
	}

	public void setAddressLine1(String addressLine1) {
		this.addressLine1 = addressLine1;
	}

	public String getAddressLine2() {
		return addressLine2;
	}

	public void setAddressLine2(String addressLine2) {
		this.addressLine2 = addressLine2;
	}

	public String getAddressLine3() {
		return addressLine3;
	}

	public void setAddressLine3(String addressLine3) {
		this.addressLine3 = addressLine3;
	}

	public boolean getPreferredOrg() {
		return preferredOrg;
	}

	public void setPreferredOrg(boolean preferredOrg) {
		this.preferredOrg = preferredOrg;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getWebAddress() {
		return webAddress;
	}

	public void setWebAdress(String webAddress) {
		this.webAddress = webAddress;
	}

	public String getCharityNumber() {
		return charityNumber;
	}

	public void setCharityNumber(String charityNumber) {
		this.charityNumber = charityNumber;
	}

	public String getCompanyNumber() {
		return companyNumber;
	}

	public void setCompanyNumber(String companyNumber) {
		this.companyNumber = companyNumber;
	}

	public boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(boolean isActive) {
		this.isActive = isActive;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address adress) {
		this.address = adress;
	}

	public Sic getSic() {
		return sic;
	}

	public void setSic(Sic sic) {
		this.sic = sic;
	}

	
}
